//
//  BaseViewController.m
//  ToYourHeartNews
//
//  Created by XJing on 16/1/15.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥. All rights reserved.
//

#import "BaseViewController.h"
#import "BlackManager.h"
@interface BaseViewController ()

@end

@implementation BaseViewController
- (void)dealloc {
    
    // 必须在dealloc方法中移除观察
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.tabBarController.tabBar.tintColor = [UIColor redColor];
    if ([BlackManager sharedInstance].isNight) {
        [self setNightDayModel];
    } else {
        [self setLightDayModel];
    }
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setLightDayModel) name:@"day" object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setNightDayModel) name:@"night" object:nil];
    
}
- (void)setLightDayModel {
    NSLog(@"设置白天模式成功");
}

- (void)setNightDayModel {
    NSLog(@"-------设置夜晚模式成功");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
